home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr((((3333CCCC++++++++)))) RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr((((3333CCCC++++++++))))
-
-
-
- NNNNaaaammmmeeee
- RWFileManager - Rogue Wave library class
-
- SSSSyyyynnnnooooppppssssiiiissss
- typedef long RWoffset ;
-
-
-
- typedef unsigned long RWspace; // (typically)
- #include <rw/filemgr.h>
- RWFileManager f("file.dat");
-
-
-
-
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- Class RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr allocates and deallocates storage in a disk file,
- much like a "freestore" manager. It does this by maintaining a linked
- list of free space within the file. NNNNooootttteeee: Class RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr inherits
- class RRRRWWWWFFFFiiiilllleeee as a public base class; hence all the public member
- functions of RRRRWWWWFFFFiiiilllleeee are visible to RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr. They are not listed
- here. If a file is managed by an RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr then reading or writing
- to unallocated space in the file will have undefined results. In
- particular, overwriting the end of allocated space is a common problem
- which usually results in corrupted data. One way to encounter this
- problem is to use bbbbiiiinnnnaaaarrrryyyySSSSttttoooorrrreeeeSSSSiiiizzzzeeee(((()))) to discover the amount of space
- needed to store an RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn. For most purposes, the storage size of
- an RRRRWWWWCCCCoooolllllllleeeeccccttttiiiioooonnnn is found using the RRRRWWWWCCCCoooolllllllleeeeccccttttaaaabbbblllleeee method
- rrrreeeeccccuuuurrrrssssiiiivvvveeeeSSSSttttoooorrrreeeeSSSSiiiizzzzeeee(((()))).
-
- PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
- None
-
- PPPPuuuubbbblllliiiicccc CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
- RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr(const char* filename, const char* mode = 0);
-
-
- Constructs an RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr for the file with path name ffffiiiilllleeeennnnaaaammmmeeee using
- mode mmmmooooddddeeee. The mode is as given by the Standard C library function
- ffffooooppppeeeennnn(((()))). If mmmmooooddddeeee is zero (the default) then the constructor will attempt
- to open an existing file with the given filename for update (mode "rrrrbbbb++++").
- If this is not possible, then it will attempt to create a new file with
- the given filename (mode "wwwwbbbb++++"). If the file exists and is not empty,
- then the constructor assumes it contains an existing file manager; other
- contents will cause an exception of type RRRRWWWWEEEExxxxtttteeeerrrrnnnnaaaallllEEEErrrrrrrr to be thrown. If
- no file exists or if an existing file is empty, then the constructor will
- attempt to create the file (if necessary) and initialize it with a new
- file manager. The resultant object should be checked for validity using
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr((((3333CCCC++++++++)))) RRRRWWWWFFFFiiiilllleeeeMMMMaaaannnnaaaaggggeeeerrrr((((3333CCCC++++++++))))
-
-
-
- function iiiissssVVVVaaaalllliiiidddd(((()))). A possible exception that could occur is RRRRWWWWFFFFiiiilllleeeeEEEErrrrrrrr.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
- RWoffset
- aaaallllllllooooccccaaaatttteeee(RWspace s);
-
-
- Allocates ssss bytes of storage in the file. Returns the offset to the
- start of the storage location. The very first allocation for the file is
- considered "special" and can be returned at any later time by the
- function ssssttttaaaarrrrtttt(((()))). A possible exception that could occur is RRRRWWWWFFFFiiiilllleeeeEEEErrrrrrrr.
-
- void
- ddddeeeeaaaallllllllooooccccaaaatttteeee(RWoffset t);
-
-
- Deallocates (frees) the storage space starting at offset tttt. This space
- must have been previously allocated by a call to aaaallllllllooooccccaaaatttteeee(((()))). The very
- first allocation ever made in the file is considered "special" and cannot
- be deallocated. A possible exception that could occur is RRRRWWWWFFFFiiiilllleeeeEEEErrrrrrrr.
-
- RWoffset
- eeeennnnddddDDDDaaaattttaaaa();
-
-
- Returns an offset just past the end of the file.
-
- RWoffset
- ssssttttaaaarrrrtttt();
-
-
- Returns the offset of the first space ever allocated for data in this
- file. If no space has ever been allocated, returns RRRRWWWWNNNNIIIILLLL. This is
- typically used to "get started" and find the rest of the data in the
- file.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-